import CONSTANT from '@/common/constants.js';
import http from '@/common/http.js'
import XInput from 'vux/src/components/x-input/index.vue'
import Group from 'vux/src/components/group/index.vue'
import Datetime from 'vux/src/components/datetime/index.vue'
import Picker from 'vux/src/components/picker/index.vue'
import Popup from 'vux/src/components/popup/index.vue'

var siteIda = global.siteId

export default {
  name: 'query',
  components: {XInput, Group, Datetime, Picker, Popup},
  data () {
    return {
      reserveNo: ''
    }
  },
  mounted () {
    //var s = window.location.href
    //var arr = s.split('?')
    //var url = arr[1]
    //var theRequest = new Object()
    //var strs = url.split('&')
    //for (var i = 0; i < strs.length; i++) {
    //  theRequest[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1])
    //}
    //var openIds = theRequest.openId.split('#/')
    ////alert(openIds[0])
    ////alert(this.$route.query.openId)
    //var openId = window.sessionStorage.getItem('openId')
    //if (openId == null || openId == '' || openId == 'undefined') {
    //  window.sessionStorage.setItem('openId', openIds[0])
    //  //window.sessionStorage.setItem('studentId', theRequest.studentId)
    //  //window.sessionStorage.setItem('siteId', theRequest.siteId)
    //  //window.sessionStorage.setItem('wxAvatar', theRequest.wxAvatar)
    //}
    //this.siteId = window.sessionStorage.getItem('siteId')
    //this.studentId = window.sessionStorage.getItem('studentId')
  },
  methods: {
    overModify () {
      var _this = this
      if (_this.reserveNo == '') {
        alert('请输入预约号！')
      } else {
        _this.$router.push({path: '/queryResult',query:{reserveNo:_this.reserveNo}})
      }
    },
    comeBack () {
      window.history.go(-1)
    }
  }
}
